package org.abacus.platform.client.widget;

import java.awt.GraphicsConfiguration;
import java.awt.HeadlessException;

import javax.swing.JFrame;

public class Frame extends Widget {
	final JFrame frame;

	public Frame() throws HeadlessException {
		frame = new JFrame();
		init();
	}

	public Frame(GraphicsConfiguration gc) {
		frame = new JFrame(gc);
		init();
	}

	public Frame(String title, GraphicsConfiguration gc) {
		frame = new JFrame(title, gc);
		init();
	}

	public Frame(String title) throws HeadlessException {
		frame = new JFrame(title);
		init();
	}

	private void init() {
		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
	}

	public JFrame getFrame() {
		return frame;
	}

}
